<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
	</body>
	<script type="text/javascript">
		var elements = [
			'Hydrogen',
			'Helium',
			'Lithium',
			'Beryllium'
		];
		let s1=elements.map(function(element) {
			return element.length;
		}); 
		let s2=elements.map(element => {
			return element.length;
		});
		let s3=elements.map(({length}) => length); 
		console.log(s1);
		console.log(s2);
		console.log(s3);
	</script>

</html>